package net.tngou.iask.pojo;

import java.sql.Date;
import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalDateTime;

import net.tngou.iask.util.DateUtil;
import net.tngou.iask.util.IDUtil;

/**
 * 病人信息
 * @author tngou@tngou.net
 *
 */
public class Patient extends POJO {
	private String no ;//	  	  	身份证 
	private String name 	;//	  	  	姓名 
//	private String phone 	;//	  	  	联系电话 
	private int gender 	;// 	  	性别 0（未知）、 1（男） 、2 （女） 
	private Date birthday 	;// 	  	出生年月 
	private String nation 	;//	  	  	民族 
	private long birthcity 	;// 	  	出生城市 
	private String birthaddress 	;//	 出生地址 
	private long lowcity 	;// 	  	现居城市 
	private String lowaddress 	;// 	  	  	现居地址 
	private int alive 	;// 	  	生存情况 ：-1（死亡）、0（未知）、 1（健在）  
	private Timestamp time 		;// 	  	创建时间 
	public String getNo() {
		return no;
	}
	public void setNo(String no) {
		this.no = no;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
//	public String getPhone() {
//		return phone;
//	}
//	public void setPhone(String phone) {
//		this.phone = phone;
//	}
	public int getGender() {
		return gender;
	}
	public void setGender(int gender) {
		this.gender = gender;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public String getNation() {
		return nation;
	}
	public void setNation(String nation) {
		this.nation = nation;
	}
	public long getBirthcity() {
		return birthcity;
	}
	public void setBirthcity(long birthcity) {
		this.birthcity = birthcity;
	}
	public String getBirthaddress() {
		return birthaddress;
	}
	public void setBirthaddress(String birthaddress) {
		this.birthaddress = birthaddress;
	}
	public long getLowcity() {
		return lowcity;
	}
	public void setLowcity(long lowcity) {
		this.lowcity = lowcity;
	}
	public String getLowaddress() {
		return lowaddress;
	}
	public void setLowaddress(String lowaddress) {
		this.lowaddress = lowaddress;
	}
	public int getAlive() {
		return alive;
	}
	public void setAlive(int alive) {
		this.alive = alive;
	}

	public Timestamp getTime() {
		return time;
	}
	public void setTime(Timestamp time) {
		this.time = time;
	}
	
	/**
	 * 简单身份证号
	 * @return
	 */
	public String SimpleNo() {
		return IDUtil.Simple(no);
	}
	/**
	 * 年龄
	 * @return
	 */
	public int Age() {
		return	LocalDate.now().getYear()-birthday.toLocalDate().getYear();
	}
}
